/**
 * 
 */
package com.wsj.service.impl;

import org.springframework.dao.DataAccessException;

import com.wsj.dao.IHomeSiteNewsClassDao;
import com.wsj.dao.IHomeSiteNewsDao;
import com.wsj.dao.IHomeSiteNewsSearchDao;
import com.wsj.service.IHomeSiteNewsSearchServ;
import com.wsj.util.exception.BusinessException;
import com.wsj.util.page.PageResultSet;

/**
 * @author fengbin  createTime:2009-7-20
 *
 */
public class HomeSiteNewsSearchServImpl implements IHomeSiteNewsSearchServ {
	
	/********
	 * 新闻搜索dao
	 */
	private IHomeSiteNewsSearchDao homeSiteNewsSearchDao;
	
	/*********
	 * 新闻dao
	 */
	private IHomeSiteNewsDao  homeSiteNewsDao;
	
	/**********
	 * 新闻分类dao
	 */
	private IHomeSiteNewsClassDao homeSiteNewsClassDao;
	
	

	public IHomeSiteNewsClassDao getHomeSiteNewsClassDao() {
		return homeSiteNewsClassDao;
	}

	public void setHomeSiteNewsClassDao(IHomeSiteNewsClassDao homeSiteNewsClassDao) {
		this.homeSiteNewsClassDao = homeSiteNewsClassDao;
	}

	public IHomeSiteNewsDao getHomeSiteNewsDao() {
		return homeSiteNewsDao;
	}

	public void setHomeSiteNewsDao(IHomeSiteNewsDao homeSiteNewsDao) {
		this.homeSiteNewsDao = homeSiteNewsDao;
	}

	public IHomeSiteNewsSearchDao getHomeSiteNewsSearchDao() {
		return homeSiteNewsSearchDao;
	}

	public void setHomeSiteNewsSearchDao(
			IHomeSiteNewsSearchDao homeSiteNewsSearchDao) {
		this.homeSiteNewsSearchDao = homeSiteNewsSearchDao;
	}

	
	
	/**********
	 * 通过类目id,获取所有审核的,未删除的新闻
	 */
	public PageResultSet loadHomeSiteNewsListByClassId(long classId ,String keyWords,int page, int pageSize) throws BusinessException {
		
		  try {
			return  this.homeSiteNewsSearchDao.loadHomeSiteNewsListByClassId(classId,keyWords, page,  pageSize);
		} catch (DataAccessException e) {
			throw new BusinessException("loadHomeSiteNewsListByClassId error",e);
		}
	}
	
	
	
	

}
